from sqlmodel import SQLModel, Field

# 交易对兑换统计基础模型
class SwapStatBase(SQLModel):
    uid: int = Field(default=0, description="用户ID")
    productPairId: str = Field(default="", description="交易对编码")
    swapCount: int = Field(default=0, description="兑换次数")
    swapAmount: float = Field(default=0.0, description="兑换金额")

# 创建请求模型
class SwapStatCreate(SwapStatBase):
    pass

class SwapStatUpdate(SwapStatBase):
    id: int = Field(default=0, description="交易对兑换统计ID")